<?php

namespace app\queue\redis;

use app\common\TaskStatus;
use app\model\AppConfig;
use app\service\MongodbService;
use app\service\RedisQueueService;
use app\service\WechatQyService;
use Exception;
use support\Cache;
use support\Log;
use Webman\RedisQueue\Consumer;
use Workerman\Connection\AsyncTcpConnection;

class ConverterSend implements Consumer
{
    // 要消费的队列名
    public string $queue = 'converter_list';

    // 连接名，对应 config/redis_queue.php 里的连接`
    public string $connection = 'default';

    // 消费

    /**
     * 自动消费
     *
     * 队列生产 $contact = [
     * 'title' => $i,
     * ];
     * $a = RedisQueueService::instance()->_send($contact);
     *
     * @throws Exception
     */
    public function consume($data)
    {
        Log::info($data['title']);
    }
}